package cn.wx.jove.core.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import cn.wx.common.persistence.base.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import cn.wx.jove.core.service.VitualcoinService;
import cn.wx.jove.core.entity.Vitualcoin;
import cn.wx.common.persistence.web.ResponseData;
import cn.wx.jove.core.entity.qo.VitualcoinQ;
/**
 *   @description : Vitualcoin 控制器
 *   ---------------------------------
 *   @author  
 *   @since 2018-12-14
 */
@RestController
@RequestMapping("/vitualcoin")
public class VitualcoinController extends BaseController {

    @Autowired
    private VitualcoinService vitualcoinService;

    /**
     * @description : 通过条件获取Vitualcoin
     * ---------------------------------
     * @author :  
     * @since : Create in 2018-12-14
     */
    @RequestMapping(value = "/query/unique")
    public ResponseData queryUnique(VitualcoinQ vitualcoinQ) throws Exception {
        return success(vitualcoinService.queryUnique(vitualcoinQ,Vitualcoin.class));
    }

    /**
     * @description : 通过条件获取Vitualcoin分页
     * ---------------------------------
     * @author :  
     * @since : Create in 2018-12-14
     */
    @RequestMapping(value = "/query/page")
    public ResponseData queryPage(VitualcoinQ vitualcoinQ) throws Exception {
        return success(vitualcoinService.queryPage(vitualcoinQ));
    }

	/**
     * @description : 通过条件获取Vitualcoin
     * ---------------------------------
     * @author : 
     * @since : Create in 2018-12-14
     */
    @RequestMapping(value = "/query/list")
    public ResponseData queryList(VitualcoinQ vitualcoinQ) throws Exception {
        return success(vitualcoinService.queryList(vitualcoinQ));
    }
    
    /**
     * @description : 通过id删除Vitualcoin
     * ---------------------------------
     * @author :  
     * @since : Create in 2018-12-14
     */
//    @RequestMapping(value = "/remove")
//    public ResponseData remove(Vitualcoin vitualcoin) throws Exception {
//        return success(vitualcoinService.remove(vitualcoin));
//    }

    /**
     * @description : 通过id更新Vitualcoin
     * ---------------------------------
     * @author :  
     * @since : Create in 2018-12-14
     */
    @RequestMapping(value = "/modify")
    public ResponseData modify(Vitualcoin vitualcoin) throws Exception {
        return success(vitualcoinService.modify(vitualcoin));
    }
    
    /**
     * @description : 新增Vitualcoin
     * ---------------------------------
     * @author :  
     * @since : Create in 2018-12-14
     */
     @RequestMapping(value = "/create")
     public ResponseData create(Vitualcoin vitualcoin) throws Exception {
        return success(vitualcoinService.create(vitualcoin));
     }
     
     /**
      * @description : 查询最大nid数据
      * ---------------------------------
      * @author :  
      * @since : Create in 2018-11-29
      */
     @RequestMapping(value = "/queryMax")
     public ResponseData queryMax() throws Exception {
        return success(vitualcoinService.queryMax());
     }
}